#pragma once

#include <QMenu>

#define FMT_ACTION_TEXT(text) QStringLiteral("%1 \t").arg(text)

class CusMenu : public QMenu {
	Q_OBJECT

public:
	CusMenu(QWidget *parent = NULL);
	CusMenu(const QString &bgColor, const QString &tc, int fw, int fs, int radius = 5,  QWidget *parent = NULL);
	virtual ~CusMenu();

	void setPos(const QPoint &pos);

protected:
	void showEvent(QShowEvent *event) override;

private:
	void loadStyle();

private:
	QString m_bgColor{ "#FFFFFF" };
	QString m_textColor{ "#25466D" };
	int m_radius{ 5 };
	int m_fontWeight{ 500 };
	int m_fontSize{ 18 };
	QPoint m_pos;
};
